package com.murray.assignment.pojo;

import java.util.Date;

/**
 * @author Murray
 * @Date 2021/8/4
 * @Time 9:46
 */
public class CartInfo {
    /**
     * 购物车信息的id
     */
    private Integer id;
    /**
     * 购物车的id
     */
    private Integer cartId;
    /**
     * skuId
     */
    private Integer skuId;
    /**
     * 购物车数量
     */
    private Integer buyNum;
    /**
     * 创建时间，这里直接赋值是为了mybatis哪里好操作
     */
    private Date date=new Date();

    @Override
    public String toString() {
        return "CartInfo{" +
                "id=" + id +
                ", cartId=" + cartId +
                ", skuId=" + skuId +
                ", buyNum=" + buyNum +
                ", date=" + date +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public Integer getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(Integer buyNum) {
        this.buyNum = buyNum;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public CartInfo() {
    }

    public CartInfo(Integer id, Integer cartId, Integer skuId, Integer buyNum, Date date) {
        this.id = id;
        this.cartId = cartId;
        this.skuId = skuId;
        this.buyNum = buyNum;
        this.date = date;
    }
}
